package org.example.service.impl;

import org.example.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Override
    public void getById() {

        //模拟连接数据库取数据的过程
        String s = "";
        for (int i = 0; i < 100; i++) {
            s += i;
        }


    }

    @Override
    public void getAll() {

        //模拟连接数据库取数据的过程
        String s = "";
        for (int i = 0; i < 1000; i++) {
            s += i;
        }
    }

    @Override
    public void add() {
        System.out.println("执行添加用户操作");
    }

    @Override
    public void update() {
        System.out.println("执行修改用户操作");
        //System.out.println(10/0);
    }

    @Override
    public void update1(String str) {
        System.out.println("执行update1");
    }

    @Override
    public String update2() {
        System.out.println("执行update2");

        /*String str = null;
        str.length();*/

        return "aaa";
    }

}
